﻿<UserControl x:Class="OnlineVideos.ShowHistory"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480" Loaded="UserControl_Loaded">
    
    <Grid x:Name="LayoutRoot">
        <ListBox x:Name="lbxVidoes" Width="470" SelectionChanged="lbxVidoes_SelectionChanged" Foreground="White" Grid.Row="0">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid Height="200">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="115"/>
                            <ColumnDefinition Width="350"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Image Grid.Column="0" Grid.Row="0" x:Name="imgMovie" Source="{Binding ImgSource}" VerticalAlignment="Top" Width="100" Height="170"/>
                        <StackPanel Grid.Column="1" Grid.Row="0" Margin="15,0,0,0" Height="210">
                            <TextBlock Text="{Binding Title}" FontSize="24" FontWeight="Bold" TextWrapping="Wrap" Margin="10,0,0,0" Foreground="white"/>
                            <StackPanel Margin="10,10,0,0" Orientation="Horizontal">
                                <Image Width="139" Height="18" Source="{Binding ImageRating}"/>
                                <TextBlock Text="{Binding ReleaseDate}" FontSize="22" Margin="70,0,0,0" Foreground="white"></TextBlock>
                            </StackPanel>
                            <TextBlock Text="{Binding Genre}" FontSize="22" Margin="10,10,0,0" Foreground="white"></TextBlock>
                            <StackPanel Orientation="Horizontal"  Margin="10,10,0,0">
                                <TextBlock Text="Language: " FontSize="22" Foreground="White" Visibility="{Binding SubTitle, TargetNullValue=Collapsed}"></TextBlock>
                                <TextBlock Text="{Binding SubTitle}" FontSize="22" TextWrapping="Wrap" Foreground="White"  Visibility="{Binding SubTitle, TargetNullValue=Collapsed}"></TextBlock>
                            </StackPanel>
                        </StackPanel>
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <StackPanel Name="adstackplHistoryVideos" Grid.Row="1" Orientation="Vertical"  Margin="-4,3,0,0">
        </StackPanel>
        <Canvas>
            <TextBlock Margin="100,200,0,0" FontSize="28" x:Name="tblkMoviesHistory" Foreground="White" Visibility="Collapsed"/>
        </Canvas>
    </Grid>
</UserControl>
